/********************************************************************************
 *      Copyright:  (C) 2022 lijiale<244871365@qq.com>
 *                  All rights reserved.
 *
 *       Filename:  nbiot.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(20/01/22)
 *         Author:  lijiale <244871365365@qq.com>
 *      ChangeLog:  1, Release initial version on "20/01/22 09:58:05"
 *                 
 ********************************************************************************/

#ifndef __NBIOT_H__
#define __NBIOT_H__

#define BAUDRATE 9600
#define AT_MODEL "AT+CGMM\r\n"

enum
{
    OFF,
    NO,
};

int find_nbiot_dev( comport_t *comport);//查找BC28对应的串口

int set_nbiot_cfun(comport_t *comport, int swtch);//开关射频

int check_nbiot_register(comport_t *comport);//查注册信息

int set_nbiot_register( comport_t *comport , char *ip , char *port);//设置注册信息(ip, 端口)

int check_nbiot_attach(comport_t *comport, nbiot_hwinfo_t *nbiot);//检查是否附着网络成功

int nbiot_module( comport_t* comport , nbiot_hwinfo_t  *nbiot );//获取模块硬件信息

int nbiot_report_cloud(comport_t *comport, int temp);//上报数据

#endif
